package com.lanou.pianke.search.web.controller;

import com.lanou.pianke.search.entity.User;
import com.lanou.pianke.search.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RequestMapping("/es/")
@RestController
public class UserController {

    @Autowired
    private UserService userService;

    // 根据文章回复内容查评论
    @GetMapping("findByUname")
    public List<User> findByUname(String searchContent){
        return userService.searchByUname(searchContent);
    }

}
